package com.cailu.rabmq.sender.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.cailu.rabmq.sender.sender.SenderConfFanoutExchangeTemplate;
import com.cailu.rabmq.sender.version.ApiVersionConstant;
import com.cailu.rabmq.sender.version.ApiVersions;

/**
 * @author cailu
 * @filename SenderConfExchangeController
 * @description Fanout 广播模式
 * @date 2020/3/31 17:51
 */
@Api(value = "10004-Fanout 广播模式", tags = {"10004-Fanout 广播模式"})
@RestController
public class SenderConfFanoutExchangeController {

	@Autowired
	private SenderConfFanoutExchangeTemplate template;

	@GetMapping("sendFanoutExchange")
	@ApiOperation(value = "40001-创建 Fanout 广播模式 发布者", notes = "创建 Fanout 广播模式 发布者")
	@ApiVersions(group = ApiVersionConstant.FAP_APP100)
	public String sendFanoutExchange(@ApiParam(value = "自定义发送能容") @RequestParam(value = "str") String str) {
		template.sendFanoutExchange(str);
		return "Fanout 广播模式 创建成功！";
	}

}
